<%= form_for(@user) do |f| %>
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
      <% @user.errors.full_messages.each do |msg| %>
        <li><%= msg %></li>
      <% end %>
      </ul>
    </div>
  <% end %>

  <div class="field">
    <%= f.label :username %><br />
    <%= f.text_field :username %>
  </div>
  <div class="field">
    <%= f.label :password %><br />
    <%= f.password_field :password %>
  </div>

  <div class="field">
    <%= f.label :password_confirmation %><br />
    <%= f.password_field :password_confirmation %>
  </div>
    
  <div class="field">
    <%= f.label :fullname %><br />
    <%= f.text_field :fullname %>
  </div>
  <div class="field">
    <%= f.label :birthday %><br />
    <%= f.date_select :birthday, :start_year => Time.now.year - 100 , :end_year => Time.now.year %>
  </div>
  <div class="field">
    <label for="social_id">ID Number:</label><br />
    <%= f.text_field :social_id %>
  </div>
  <div class="field">
    <%= f.label :gender %><br />
    <%= select_tag "user[gender]" , options_for_select([['Male', 'male'], ['Female', 'female']], 'male') %>
  </div>
  
  <div class="field">
    <%= f.label :email %><br />
    <%= f.text_field :email %>
  </div>
  <div class="field">
    <%= f.label :university %><br />
    <%= f.text_field :university %>
  </div>
  <div class="field">
     <label for="uni_id">Student ID:</label><br />
    <%= f.text_field :uni_id %>
  </div>
  <div class="field">
    <%= f.label :phone %><br />
    <%= f.text_field :phone %>
  </div>
  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
